
// 广告关闭事件
$(function(){
    $('.ad-close-btn').click(()=>{
        $(this).hide();
        $('.ad-container').css("height", "0px");
    })
})
//END

/** 导航栏滚动逻辑 */
let NOW_TOP = 0
$(document).scroll(function() {
    setTimeout(()=>{
        let scroH = $(document).scrollTop();  //滚动高度
        let viewH = $(window).height();  //可见高度
        let contentH = $(document).height();  //内容高度
        if ((NOW_TOP - scroH) <= 0 & NOW_TOP < 10000){
            if (scroH > 95){
                $(".left-nav-container").css("top", scroH - 95 + "px");
                
            }else{
                $(".left-nav-container").css("top", scroH  + "px");
                
            }
        }
        else if ((NOW_TOP - scroH) > 0){
            $(".left-nav-container").css("top", scroH + "px");
            
        }
        NOW_TOP = scroH
    }, 300)
});
// END